$status =
wave.Convert ("<Source Filename >","<Codec>","[Target Filename]")
Converts the wave file into the specified wave format and saves it in a separate file.
The default wave format is PCM.
The different wave conversion formats available are:
MP3, PCM8_8KHz, PCM8_16KHz, PCM8_22KHz,
PCM8_44KHz, PCM8_48KHz, PCM16_16KHz,
PCM16_22KHz, PCM16_44KHz,
PCM16_48KHz, A-law, μ-law
Parameters
<Source Filename>
Specify the name of the source wave file.
<Codec>
Assign the wave conversion format.
<Target Filename>
Specify the name of the target wave file.
Return Value
Returns 1 on successful conversion, else 0.
Remark
If target filename is not specified as parameter, then the converted
format is copied to source filename again.
Example
-
$status = wave.convert("welcome.wav", "MP3", "welcome_mp3.mp3")
msgbox($status)
- Welcome.wav is converted into MP3 format and $status returns 1.
2. $status = wave.convert("welcome.wav", "GSM", "welcome_GSM.wav")
msgbox($status)
- Welcome.wav is converted into GSM format and $status returns 1.